<?php
//AKA step1
session_start();
if(isset($_GET['name'])){
$err = array();
	unset($err);
	    	
	if(ereg('[^A-Za-z0]', $_GET['name'])||strlen($_GET['name'])<1){$err['name'] = 'Špatné jméno';}
	if(!isset($err)){$_SESSION['Name']=$_GET['name'];header('Location: step2.php');}
}
include("Design.php");
Top();
?>
<form action="index.php" method="get">
		
	<br/><br/>
	<label for="name">Jméno</label>
	<input type="text" id="name" name="name" value="<?php echo $_GET['name'];?>">

	<input type="submit" value="Další">
</form>
<?php
foreach ($err as $current){
			echo "<div class='WrongValue'>" . $current . "</div><br/>";
		}
		Bottom();
?>